This invention relates generally to the field of computer systems, and, more particularly, to the management of data residing in computer memory devices.
It is often the case that data objects occupy space in a computer memory, even when there is no immediate need for a computer system to retrieve them from the memory. These data object take up space that could otherwise be used by new data. It is desirable for the computer system employing the memory to remove from the memory data that is not presently being used, in order to make room for new data.
A hard disk on a personal computer is an example of a memory that may become filled with data objects, such as application programs or databases. Game applications, in particular, are exemplary of the type of data objects that present the problem addressed herein, because their usage pattern is often characterized by an initial period of frequent use (i.e., when the user has just purchased the game and is interested in playing it), followed by a period of infrequent use or non-use (when the user has won the game or lost interest in the game). These game applications tend to accumulate and can lead to large amounts of disk space being consumed by applications that may never be used again. To maintain on a hard disk a data object that the user will never use is wasteful of space, and, assuming that it can be determined that the data object will not be used again, the data object may be removed entirely from the hard disk.
When a computer system attempts to place new data in a memory such as a hard disk (e.g., where a user installs a new application on the disk) and there is not sufficient space for the new data, either data must be removed from the disk to make room for the new data, or additional memory must be added, or both. In order to create space on the disk, the user may examine the contents of the disk and selectively remove data for which there is no foreseeable need (e.g., by uninstalling applications, by deleting files, etc.). This method, however, places a burden on the user, as the user must interrupt what he is doing and manually select data to be removed. Moreover, the user may predict incorrectly which data objects will not be used in the future. If a removed data object is needed in the future, the user must reinstall it from a secondary source, such as a CD-ROM or a network server; if there is no secondary source containing the data, then the removed data cannot be replaced. Additionally, there may be data objects for which some of the data comprising the object can be recreated from a secondary source, but some data cannot be recreated. It is burdensome, and sometimes not possible, to select recreateable portions of a data object for removal (e.g., bitmap images for use with a game application), while preserving non-recreateable data (e.g., user high score, or saved game files).
In view of the foregoing, there is a need for a system that overcomes the limitations and drawbacks of the prior art.
The invention manages space in a computer memory by removing data from the memory in a manner that does not preclude use of the data object that comprises the data. The invention contemplates the use of a xe2x80x9cdownsizexe2x80x9d operation, which reduces the space occupied by a data object in a memory in order to free up space for new data. A data object is a collection of associated data organized into separable parts. Example data objects include application programs (where the parts may include: executable files, video files, bitmap images, etc.), and databases (where the parts may include: files of data, some of which have been archived elsewhere; a directory for the data; etc.). Each data object provides a downsize operation, which is designed with respect to the specific data that the object comprises, the importance of the data for the object""s function, and whether the data can be recovered from another source if necessary. The downsize operation for a given data object may reduce the size of the data object by removing non-essential data. The downsize operation may also reduce the size of the object by removing data that can be recreated from another source if necessary. A system in accordance with the invention selects a data object to downsize and calls the object""s downsize operation when the system needs to create space.
An example data object may be a software application residing on a hard disk. If a user needs additional space on the disk (e.g., to install a new application), the system could select an application that has not been used for a long period of time and call the application""s downsize operation to create more space. An example downsize operation provided with the application could remove non-essential data, such as the data file for an introductory video tour of the software, which the user has already seen. The downsize operation could also remove data that can easily be recovered from the application""s CD-ROM, such as executable files or bitmap images used by the software. In designating recoverable data to delete, the downsize operation may be designed to consider the ease with which the data can be recovered. For example, the downsize operation may remove data that can be reloaded quickly from a CD-ROM, but not data that must be recovered from a server by way of a slow dial-up connection. The downsize operation may also leave on the hard disk data associated with the data object that cannot be recreated from another source. In the example, such data might include user-created files, a file of system-dependent parameters, or a file of user preferences that were provided by the user at the time the application was installed. The downsize operation may remove different amounts of data based on input from the system specifying how much memory the system needs (e.g., the downsize operation first deletes information that can be recovered quickly from a CD-ROM, but will also delete information that must be recovered from a slow dial-up connection if necessary to satisfy the system""s space request). Each application provides a downsize operation appropriate for the type of data associated with the application.
The invention also contemplates a xe2x80x9crestorexe2x80x9d operation, which may be provided with the data object to work together with the downsize operation. The restore operation replaces data that has been removed by a prior downsize operation. While a data object may provide a downsize operation without a restore operation, providing a restore operation allows the data object to provide a more effective downsize operation, which removes essential data that can be recreated from another source (e.g., executable files residing on a CD-ROM, database files that have been archived to a tape, etc.), rather than merely non-essential data (e.g., an introductory video tour of an application, etc.). If a user later attempts to access a downsized data object, the system calls the data object""s restore operation, which reloads data from a secondary source (e.g., a CD-ROM).
Game software installed on a hard disk exemplifies a use of the system. Games typically obey a usage pattern characterized by a period of intense use when the game is new, followed by infrequent use or non-use after the user has won the game or lost interest in the game. Much of the data associated with a game application (e.g., executable files, bitmap images, etc.) is typically copied to a computer system""s hard disk from a CD-ROM at the time the game is installed, and can be copied to the hard disk again if it is needed subsequent to being removed. If a user needs more space on the disk, a system embodying the invention could select, for example, the least recently played game application and call the game""s downsize operation. The downsize operation could delete all executable files and bitmap images that had been copied to the hard disk from a CD-ROM at install time, leaving on the disk a file containing the user""s high scores for the game. If the user subsequently reacquires an interest in the game and attempts to run it, the system calls the restore operation to replace the removed data to the disk (e.g., from a CD-ROM, prompting the user to insert the CD-ROM, if necessary). If there is not enough space on the disk to reinstall the data, the system selects another game application to downsize and calls that application""s downsize operation prior to restoring the data to the disk.
Other features of the invention are described below.